package cn.hinglo.gameclaw.user.entity;

import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * @createTime: 2017/12/28
 * @author: HingLo
 * @description: 登录相关实体
 */
@Data
@Accessors(chain = true)
public class Users {
    @NotNull(message = "用户名不能为空")
    @Size(min = 6, max = 20, message = "用户名长度必须在6-20之间！")
    @Pattern(regexp = "^[0-9a-zA-z_]{6,}$", message = "用户名不符合规则")
    private String username;
    @NotNull(message = "密码不能为空")
    @Size(min = 6, max = 20, message = "密码长度必须在6-20之间！")
    private String password;
}
